<%@ page contentType="text/html; charset=utf-8" language="java"  errorPage="" %>
<%@page import="offer.SessionObj"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
SessionObj sessionObj = (SessionObj)request.getSession().getAttribute("sessionObj");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NETCONF Development Toolkit</title>
	<meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/index.css"  />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/register.css"  />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/items.css"  />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/subItems.css" />
    <script type="text/javascript"  src="<%=basePath%>jstree-v.pre1.0/_lib/jquery.js"></script>
</head>
  <body style="margin:0px; padding:0px;">
  <div id="titleContent" class="titleContent">
  <div class="title_bar">
    <div style="float:left;width:300px"><img width="300" height="50" src="<%=basePath%>images/log_3.png" /></div>
    <div style="float:left;width:800px" >
       <div style="font-size:14px;height:32px;margin:0px;padding-top:2px;border:0px;">
       </div>
       <div align="right" style="font-size:14px;margin:0px;padding:0px;border:0px;">
       </div>
    </div>
    <div style="clear:both;"></div>
   </div>
   </div>
   <div class="mainContent">
   <form id="ChangePWDForm" method="post" action="<%=basePath %>ChangePWDServlet" class="IndexFormStyle" >
       <div style="float:left;width:300px" align = "right">
          <img src="<%=basePath%>images/member.png" />
       </div>
       <div style="float:left;width:800px" >
	       <div class="itemTitle">
		           修改密码 
		   </div>
		   <div class="ListItem">
	         <span class="textSpan">&nbsp;&nbsp;8位&nbsp;工&nbsp;号:</span>
	         <input type="text" class="inputText"  id="_name" name="_name" value="<%=sessionObj.getMember().getEmpNo() %>" readonly="readonly"  />
	       </div>
	       <div class="ListItem">
	         <span class="textSpan">&nbsp;&nbsp;&nbsp;旧&nbsp;密&nbsp;码:</span>
	         <input class="inputText" type="password" id="_password" name="_password" value="" />
	       </div>
	       <div class="ListItem">
	         <span class="textSpan">&nbsp;&nbsp;&nbsp;新&nbsp;密&nbsp;码:</span>
	         <input class="inputText"  type="password"  id="new_password" name="new_password" value="" />
	       </div>
	       <div class="ListItem">
	         <span class="textSpan">&nbsp;新密码确认:</span>
	         <input class="inputText"  type="password"  id="confrim_password" name="confrim_password" value="" />
	       </div>
	       <div class="ListItem" align = "center">
	 	  	 <input type="reset" value = "清空" />
	 	  	 <input type="button" onclick="formSubmit()" value = "提交" />
	 	   </div>
	 	   <% if(null != request.getAttribute("msg") ){ %>
	 	   <div class="ListItem" align = "center">
	 	  	 <span style="color:#F00;"><%=request.getAttribute("msg")%></span>
	 	   </div>
	 	   <% } %>
       </div>
       <div style="clear:both;"></div>
     </form>
   </div>
   
<script type="text/javascript" >
	function formSubmit(){
		if($("#new_password").val() != $("#confrim_password").val()  ){
		    alert("前后两次输入的新密码不一致，请重新输入！");
		    $("#new_password").val("");
		    $("#confrim_password").val("");
		    return ;
		}
		document.getElementById("ChangePWDForm").submit();
	}
</script>
  </body>
</html>
